package observer;

/**
 * @author wcj
 * @Date 2021/6/23 22:19
 * @Version 1.0
 */
public class Client {

 public static void main(String[] args) {
  Subject subject = new Subject("线程", "就绪态Ready");

  new ConcreteSubject("观察者1", subject);
  new ConcreteSubject("观察者2", subject);
  new ConcreteSubject("观察者3", subject);

  subject.state = "运行态";

  subject.notifyObserver();
 }
}
